<%@ Page Language="C#" MasterPageFile="~/Administration/main.master" AutoEventWireup="true"
    CodeFile="Products.aspx.cs" Inherits="Tathata.Web.Administration.Administration_Products" %>

<asp:Content ID="c1" ContentPlaceHolderID="cph1" runat="Server">
    <h4>
        Products</h4>
    <table class="adminContent">
        <tr>
            <td colspan="2">
                <asp:Button runat="server" Text="Export to XML" CssClass="adminButton" ID="btnExportXML"
                    OnClick="btnExportXML_Click" ValidationGroup="ExportXML"></asp:Button>
            </td>
        </tr>
    </table>
    <br />
    <br />
    <asp:GridView ID="gvProducts" runat="server" AutoGenerateColumns="False" Width="100%"
        OnPageIndexChanging="gvProducts_PageIndexChanging" AllowPaging="true" PageSize="15">
        <Columns>
            <asp:BoundField DataField="ProductID" HeaderText="Product ID" Visible="False"></asp:BoundField>
            <asp:TemplateField HeaderText="Name" ItemStyle-Width="70%">
                <ItemTemplate>
                    <a href="ProductDetails.aspx?ProductID=<%#Eval("ProductID")%>">
                        <%#Server.HtmlEncode(Eval("Name").ToString())%>
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Published" HeaderText="Published" HeaderStyle-HorizontalAlign="Center"
                ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
            <asp:TemplateField HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="15%"
                ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <a href="ProductDetails.aspx?ProductID=<%#Eval("ProductID")%>">Edit </a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <br>
    <input type="button" onclick="location.href='ProductAdd.aspx'" value="Add new" id="btnAddNew"
        class="adminButton" />
    <br />
</asp:Content>
